<%@ page language="java" import="control.database.*" pageEncoding="gb2312"%>

<%
Unit unit = new Unit();
request.setCharacterEncoding("GBK");//
System.out.println("1111111");

unit.setSuntid(request.getParameter("txtSuntid").toString());
unit.setSuntname(new String(request.getParameter("txtSuntname").toString()));
unit.setSuntcategory(request.getParameter("selSuntcategory").toString());
unit.setSdptid(request.getParameter("selSdptname").toString().trim());
unit.setSunttype(request.getParameter("txtSunttype").toString());
unit.setSIPaddr(request.getParameter("txtSipaddr").toString());
unit.setSIPport(request.getParameter("txtSipport").toString());
unit.setSSerPort(request.getParameter("txtSserport").toString());
unit.setSUnttradesman(request.getParameter("txtSunttradesman").toString());


System.out.println(request.getParameter("selSdptname").toString().trim().length());

String sql1 = unit.Unit_Add1();
//String sql2 = unit.Unit_Add2();

System.out.println(sql1);
//System.out.println(sql2);

DataBase db = new DataBase();
db.executeUpdate(sql1);
db.closeStmt();
//db.executeUpdate(sql2);
//db.closeStmt();
db.closeConn();

System.out.println("00000");
//out.println(request.getParameter("txtDptno"));
response.sendRedirect("AddSuccessful.jsp");
%>

